window.addEventListener('load', function () {
    var content_game = document.querySelector('.content-game')
    for (var j = 0; j < content_game.children.length; j++) {
        content_game.children[j].addEventListener('mouseover', function () {
            this.style.opacity = '1'
        })
        content_game.children[j].addEventListener('mouseout', function () {
            this.style.opacity = '.4'
        })
    }

    var app_text = document.querySelector('.app-text')
    for (var i = 0; i < app_text.children.length; i++) {
        app_text.children[i].addEventListener('mouseover', function () {
            this.style.backgroundColor = 'rgba(255,255,255,0.3)'
        })
        app_text.children[i].addEventListener('mouseout', function () {
            this.style.backgroundColor = ''
        })
    }
})

//   字母掉落动画
// 鼠标经过 第一个
var lang = 0
$('.content-game .letter li').each(function(i,ele){
    lang += 38
    $(ele).css({
        left : lang
    })
})
$('.content-game a').hover(function () {
    $('.letter li').each(function (i, ele) {
        $('.letter li').eq(0).fadeIn()
        $('.letter li').eq(0).animate({
            top: 280
        }, 300, function () {
            $(ele).fadeIn()
            $(ele).animate({
                top: 280
            }, 500)
            $(ele).css({
                color: 'brown'
            })
        })
    })
    })
